package gui;

import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Dimension;

import javax.swing.JFrame;
import javax.swing.JScrollPane;

public class MainFrame extends JFrame {

    private GraphScreen graphScreen;
	private int width;
	private int height;
	public static final int X = 10;
	public static final int Y = 10;
	
	Container container;
	private JScrollPane scroller;

	public MainFrame() {
		super("Graph Viewer");
		this.setSize(450, 450);
		container = this.getContentPane();
		container.setLayout(new BorderLayout());
							
		graphScreen = new GraphScreen();
		scroller = new JScrollPane(graphScreen);
		//scroller.setPreferredSize(new Dimension(300, 400));
		container.add(scroller, BorderLayout.CENTER);
				
		graphScreen.setOpaque(true);
		
		String path = "/home/clayson/workspace/tp2_p1/resources/teste.txt";		
		graphScreen.fileToGraph(path);
		
		this.setLocation(X, Y);
		this.setVisible(true);
		
		
	}
}